#ifndef DATABASEINFODIALOG_H
#define DATABASEINFODIALOG_H

#include <QDialog>
#include <QSqlDatabase>
#include <QTabWidget>
#include <QTreeWidget>
#include <QTextEdit>
#include <QDialogButtonBox>

class DatabaseSpecificManager;

class DatabaseInfoDialog : public QDialog
{
    Q_OBJECT

public:
    explicit DatabaseInfoDialog(const QSqlDatabase &db, QWidget *parent = nullptr);

private slots:
    void refreshInfo();

private:
    void setupUI();
    void loadDatabaseInfo();
    void loadFunctions();
    void loadProcedures();
    void loadTriggers();
    void loadViews();
    void loadDatabaseParameters();
    
    QSqlDatabase m_database;
    DatabaseSpecificManager *m_dbManager;
    
    // UI组件
    QTabWidget *m_tabWidget;
    QTreeWidget *m_functionsTree;
    QTreeWidget *m_proceduresTree;
    QTreeWidget *m_triggersTree;
    QTreeWidget *m_viewsTree;
    QTextEdit *m_parametersText;
    QTextEdit *m_versionText;
    QDialogButtonBox *m_buttonBox;
};

#endif // DATABASEINFODIALOG_H